package com.financing.platform.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IFpProjectSeriesDao;
import com.financing.platform.dto.FpProjectSeriesDTO;
import com.financing.platform.util.SqlName;
/**
 * fp_shop_information  
 *  数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpProjectSeriesDao")
public class FpProjectSeriesDaoImpl extends BaseDaoImpl implements IFpProjectSeriesDao {


	@Override
	public int insert(FpProjectSeriesDTO fpShopInformation) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.FpProjectSeriesSql.insert, fpShopInformation);
	}

	@Override
	public void update(FpProjectSeriesDTO fpShopInformation) throws SQLException {
		this.sqlMapClient.update(SqlName.FpProjectSeriesSql.update, fpShopInformation);
	}

	@Override
	public void updateForce(FpProjectSeriesDTO fpShopInformation) throws SQLException {
		this.sqlMapClient.update(SqlName.FpProjectSeriesSql.updateForce, fpShopInformation);
	}

	@Override
	public void delete(int id) throws SQLException {
		this.sqlMapClient.delete(SqlName.FpProjectSeriesSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpProjectSeriesDTO> queryList(FpProjectSeriesDTO fpShopInformation) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.FpProjectSeriesSql.queryList, fpShopInformation);
	}

	@Override
	public int queryListCount(FpProjectSeriesDTO fpShopInformation) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.FpProjectSeriesSql.queryListCount, fpShopInformation);
	}

	@Override
	public FpProjectSeriesDTO loadById(int id) throws SQLException {
		return  (FpProjectSeriesDTO)this.sqlMapClient.queryForObject(SqlName.FpProjectSeriesSql.loadById,id);
	}

	@Override
	public void deleteByProSeriesName(
			FpProjectSeriesDTO fpProjectSeriesDTO) throws SQLException {
		this.sqlMapClient.delete(SqlName.FpProjectSeriesSql.deleteByProSeriesName, fpProjectSeriesDTO);;
	}
 	
}
